import {
    request
} from "../utils/request.js"

//团队预约提交
const bookTeamNow =(data)=>{
    return request("/chongqing/api/reservation/bookTeamNow",data,"post")
}

// 授权获取用户信息
const HomelodingApi = (data) => {
    return request("/chongqing/api/wx/authorize", data, "post")
}


//获取预约配置
const getReservationMuseum=(data) =>{
    return request("/chongqing/api/reservation/getReservationMuseum", data, "get")
}


// 微信手机授权
const HomePhoneApi = (data) => {
    return request("/chongqing/api/wx/authorizePhone", data, "post")
}
//用户登录
const  Wxlogin = (data) => {
    return request("/chongqing/api/wx/login", data, "post")
}
//个人立即预约页面信息
const findWeekStockByDate = (data) => {
    return request("/chongqing/api/reservation/findWeekStockByDate",data, "post")
}

// 团队预约下载模块
const findWxDownloadTemplate =(data)=>{
    return request("/chongqing/api/reservation/findWxDownloadTemplate",data,"get")
}

//上传安全承诺书
const uploadImageFile =(data)=>{
  return request("/chongqing/api/file/uploadImageFile",data,"POST")
}

//首页接口 参观信息和封面图
const HomeList = (data) => {
    return request("/chongqing/api/home/getBaseInfo",data, "get")
}

// //获取场次
const findWeekStockByDay =(data)=>{
    return request("/chongqing/api/reservation/findWeekStockByDay",data,"post")
}
//校验证件号
const legitimateIdCard = (data) =>{
    return request("/chongqing/api/reservation/legitimateIdCard",data,"get")
}
//获取用户信息的健康状态
const checkHealthCode= (data)=>{
    return request ("/chongqing/api/traveler/checkHealthCode",data,"get")
}
//人脸拍照  
const uploadFiles = (data) =>{
    return request('/chongqing/api/file/uploadFile',data,"post")
}
//个人预约提交
const bookNow = (data) =>{
    return request('/chongqing/api/reservation/bookNow',data,"post")
}
//预约列表
const findWxReservationPeople = (data)=>{
    return request('/chongqing/api/reservation/findWxReservationPeople',data,"post")
}
//首页banner图
const  getWxIndex =(data)=>{
    return request('/chongqing/api/home/getWxIndex',data,"get")
}

//预约详情
const findWxReservationPeopleDetail = (data)=>{
  return request('/chongqing/api/reservation/findWxReservationPeopleDetail',data,"get")
}

//获取用户短信验证码
const sendSmsCode= (data)=>{
  return request('/chongqing/api/reservation/sendSmsCode',data,"get")
}
//整单取消预约
const cancelReservation = (data) =>{
  return request('/chongqing/api/reservation/cancelReservation',data,"get")
}

//删除预约
const deleteReservation  = (data) =>{
    return request('/chongqing/api/reservation/deleteReservation',data,"get")
}

//团队预约页面信息
const findTeamWeekStockByDate = (data) =>{
  return request('/chongqing/api/reservation/findTeamWeekStockByDate',data,"post")
}

//单个取消预约
const cancelSingleReservation = (data)=>{
    return request('/chongqing/api/reservation/cancelSingleReservation',data,"get")
}

//添加人脸图片
const updateTravelerFace = (data)=>{
    return request('/chongqing/api/reservation/updateTravelerFace',data,"post")
}


//添加出行人员
const saveTravelerInfo = (data) => {
    return request("/chongqing/api/traveler/saveTravelerInfo",data,"post")
}

//获取添加的出行人员
const findTravelerInfos = (data) => {
    return request("/chongqing/api/traveler/findTravelerInfos",data,"get")
}

//修改出行人员
const updateTravelerInfo = (data) => {
    return request("/chongqing/api/traveler/updateTravelerInfo",data,"post")
}

//删除参观人员
const deleteById= (data) => {
    return request ("/chongqing/api/traveler/deleteById",data,"get")
}

//修改出行人照片
const updateTravelerFaces = (data) => {
    return request ("/chongqing/api/traveler/updateTravelerFace",data,"POST")
}
export {
    findWxDownloadTemplate,
    HomelodingApi,
    HomePhoneApi,
    Wxlogin,
    findWeekStockByDate,
    HomeList,
    findWeekStockByDay,
    legitimateIdCard,
    uploadFiles,
    bookNow,
    findWxReservationPeople,
    getWxIndex,
    findWxReservationPeopleDetail,
    sendSmsCode,
    cancelReservation,
    deleteReservation,
    findTeamWeekStockByDate,
    cancelSingleReservation,
    updateTravelerFace,
    getReservationMuseum,
    uploadImageFile,
    bookTeamNow,
    checkHealthCode,
    saveTravelerInfo,
    findTravelerInfos,
    updateTravelerInfo,
    deleteById,
    updateTravelerFaces
}